package com.baomidou.springwind.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.springwind.entity.Others;
import com.baomidou.springwind.mapper.OthersDao;
import com.baomidou.springwind.service.OthersService;
import com.baomidou.springwind.service.support.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Others 表数据服务层接口实现类
 */
@Service
public class OthersServiceImpl extends BaseServiceImpl<OthersDao, Others> implements OthersService {

    @Autowired
    private OthersDao othersDao;

    @Override
    public Others getOthers(Long batchId) {
        Wrapper<Others> wrapper = new EntityWrapper<Others>();
        wrapper.eq("batch_id", batchId);
        Others others = othersDao.selectList(wrapper).get(0);
        return others;
    }
}